package com.zhang.first.day02;

import com.zhang.first.utils.ClickEventSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @title:
 * @author: zhang
 * @date: 2022/1/15 21:21
 */
public class Example1 {
    public static void main(String[] args) throws Exception {
        //获取执行环境
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);

        //执行逻辑
        env.addSource(new ClickEventSource())
                .print();

        //执行任务
        env.execute();

    }
}
